package com.gin.supermarket_inventory_system.inventory.dto.form;

import com.gin.supermarket_inventory_system.inventory.entity.PurveyorPo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

/**
 * 添加供应商
 * @since : 2023/10/10 11:52
 * @author : ginstone
 * @version : v1.0.0
 **/
@Getter
@Setter
@Schema(description = "表单对象:添加供应商")
public class PurveyorAddForm {
    @Schema(description = "名称")
    @NotEmpty
    String name;

    public PurveyorPo toPo() {
        final PurveyorPo po = new PurveyorPo();
        BeanUtils.copyProperties(this, po);
        return po;
    }
}